package com.future.demo.repository;

import com.future.common.BaseRepository;
import com.future.demo.domain.Person;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * PERSON DAO
 *
 * @author WUWY
 * @create 2018-05-12 上午10:50
 **/
@Repository
public interface PersonRepository extends BaseRepository<Person, String> {

    /**
     * 参考官方文档：https://docs.spring.io/spring-data/jpa/docs/current/reference/html/
     * 可以简单的搜索findBy,OrderBy等
     * @param firstName
     * @return
     */
    List<Person> findByFirstnameLikeOrderByLastnameDesc(String firstName);

}
